package com.gc.sql.ddl;

public final class ColumnDef extends Object {
    private Name name;
    
    private Type type;
    
    private NullCheck nullCheck;
    
    private DefaultValue defaultValue;
    
    public ColumnDef(Name name, Type type, NullCheck nullCheck, DefaultValue defaultValue) {
        this.name = name;
        this.type = type;
        this.nullCheck = nullCheck;
        this.defaultValue = defaultValue;
    }
    private ColumnDef() {
    }
    public static NameBuilder builder() {
        ColumnDef self = new ColumnDef();
        return self.new NameBuilder ();
    }
    public class NameBuilder extends Object {
        private NameBuilder () {}
        public TypeBuilder name(Name name) {
            ColumnDef.this.name = name;
            return ColumnDef.this.new TypeBuilder ();
        }
    
    }
    public class TypeBuilder extends Object {
        private TypeBuilder () {}
        public NullCheckBuilder type(Type type) {
            ColumnDef.this.type = type;
            return ColumnDef.this.new NullCheckBuilder ();
        }
    
    }
    public class NullCheckBuilder extends Object {
        private NullCheckBuilder () {}
        public DefaultValueBuilder nullCheck(NullCheck nullCheck) {
            ColumnDef.this.nullCheck = nullCheck;
            return ColumnDef.this.new DefaultValueBuilder ();
        }
    
    }
    public class DefaultValueBuilder extends Object {
        private DefaultValueBuilder () {}
        public ColumnDef defaultValue(DefaultValue defaultValue) {
            ColumnDef.this.defaultValue = defaultValue;
            return ColumnDef.this;
        }
    
    }
        @Override
        public String toString() {
            return String.valueOf(name)+" "+String.valueOf(type)+" "+String.valueOf(nullCheck)+" "+String.valueOf(defaultValue);
        }

}
